package com.matrix.api.user.dto;

import com.matrix.common.enums.UserTypeEnum;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @author 有点甜
 * @since 2025/7/25
 */
@Data
public class PasswordLoginDTO {
    @NotBlank(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号必须为11位")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String account;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 10, message = "密码长度必须在6-10位之间")
    private String password;

    @NotNull(message = "用户类型不能为空")
    private UserTypeEnum userType;
}
